import fetch from '@/utils/fetch'

export function getList(query) {
  return fetch({
    url: '/site/querySiteConfList',
    method: 'POST',
    params: query
  })
}

export function modifySiteConf(form) {
  return fetch({
    url: '/site/modifySiteConf',
    method: 'POST',
    params: form
  })
}

export function querySiteRuleList(page) {
  return fetch({
    url: '/site/querySiteRuleList',
    method: 'POST',
    params: page
  })
}

export function modifySiteRule(page) {
  return fetch({
    url: '/site/modifySiteRule',
    method: 'POST',
    params: page
  })
}

export function modifyRule(page) {
  return fetch({
    url: '/site/modifyRule',
    method: 'POST',
    params: page
  })
}

export function deleteBatchSiteConf(query) {
  return fetch({
    url: '/site/deleteBatchSiteConf',
    method: 'get',
    params: query
  })
}

export function queryBySiteConfId(query) {
  return fetch({
    url: '/site/queryBySiteConfId',
    method: 'get',
    params: query
  })
}

export function roleList() {
  return fetch({
    url: '/site/roleList',
    method: 'get'
  })
}

export function enabledRule(query) {
  return fetch({
    url: '/site/enabledRule',
    method: 'GET',
    params: query
  })
}

export function resumeRule(query) {
  return fetch({
    url: '/site/resumeRule',
    method: 'GET',
    params: query
  })
}

export function deleteBatchSiteRule(query) {
  return fetch({
    url: '/site/deleteBatchSiteRule',
    method: 'get',
    params: query
  })
}

export function queryGroupList() {
  return fetch({
    url: '/alarmContacts/queryGroupList ',
    method: 'get'
  })
}

export function queryChart(query) {
  return fetch({
    url: '/site/queryChart',
    method: 'POST',
    params: query
  })
}

export function querySiteConfByName(query) {
  return fetch({
    url: '/site/querySiteConfByName',
    method: 'get',
    params: query
  })
}

